interface Person {
  name: string;
}

// 接口成员的类型在继承中会可以逆变
interface NewPerson extends Person {
  name: 'j' | 'k' | 'l';
}

class Person2 {
  private name?: string = 'j';
}

interface NewPerson2 extends Person2 {
  //   name: string = ""
}
class NP implements NewPerson2 {
  // private name: string = "k"
}
let a!: NewPerson2;

export {};

// # 类型守卫
{
  const __a = 1;
  if (__a !== 1) {
    __a;
    //  ^?
  }
}
